import React from 'react';
import { Table } from 'antd';

const TableCom = props => {
  const { tableData, tableColumns } = props;
  return (
    <Table
      columns={tableColumns}
      dataSource={tableData}
      scroll={{
        x: 1500,
      }}
      summary={() => <Table.Summary></Table.Summary>}
      sticky
      pagination={{
        position: ['bottomLeft'],
        total: tableData.length,
        showTotal: total => `共 ${total} 条`,
        showSizeChanger: true,
        showQuickJumper: true,
        pageSizeOptions: [5, 10, 15, 20],
        defaultPageSize: 10,
      }}
    />
  );
};
export default TableCom;
